package com.nanbei.vod.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//当项目一启动之后，SPring获取value值以后会执行接口中的方法
@Component
public class ConstandPropertiesUtils implements InitializingBean {


    @Value("${aliyun.oss.file.keyid}")
    private String keyID;

    @Value("${aliyun.oss.file.keysecret}")
    private String keySecret;


    //定义公开静态变量
    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;

    @Override
    public void afterPropertiesSet() throws Exception {
        ACCESS_KEY_ID = keyID;
        ACCESS_KEY_SECRET = keySecret;
    }
}
